package com.what21.netfwd;

import java.net.InetSocketAddress;

public class AddressInfo {
	private final String address;
	private final int port;

	public AddressInfo(String address, int port) {
		this.address = address;
		this.port = port;
	}

	public InetSocketAddress toAddress() {
		return new InetSocketAddress(address, port);
	}

	public String getAddress() {
		return address;
	}

	public int getPort() {
		return port;
	}

	@Override
	public String toString() {
		return address + ":" + port;
	}
}
